home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
print
/
printdoc.zip
/
PRINTDOC.DOC
< prev
next >
Wrap
Text File
|
1988-04-23
|
16KB
|
322 lines
------------
----------------------------------> PRINTDOC <----------------------------------
----------------------------------> (v. 2.1) <----------------------------------
------------
written by
Phillip Garding
663 E. Mansfield Ave.
Salt Lake City, UT 84105
u-pgardi@sunset.utah.edu.UUCP or utah-cs!utah-ug!u-pgardi
---------------------------->>Statement of purpose<<----------------------------
Printdoc is a utility for printing text files on both sides of
sheets of paper. Gone will be the days of using 64 sheets of paper to
print a 64 page manual; now it will consume only 32 sheets. The
mechanism used is to print all of the odd numbered pages on the printer,
and save the even-numbered pages to a file, pause, allowing the operator
to remove the paper, turn it over, and then print the even-numbered pages
on the back sides. In addition, Printdoc also has the ability to insert
page breaks (headers and footers) into a long text file that would otherwise
print out as a continuous sheet of text. The operation of Printdoc can be
modified to accomodate any length sheets of paper, although the default
value is the standard 8 1/2 x 11 size.
For best results, use an older ribbon, since new ribbons usually
print an image dark enough to show through to the other side of the paper
and to obscure text that may be printed there. If it is important to have
a dark copy, use a heavy stock paper that won't let the print show through.
It is essential to preview the file on the screen before printing,
so that the parameters may be correctly set, and anomalies such as title
pages, etc. can be planned for. To know more, keep reading . . .
------------------------>>Requirements and assumptions<<------------------------
Printdoc requires that:
- there is space in the current directory equivalent to at least
one-half of the size of the text file to be printed
- the source file must be ascii
- all lines of text are terminated by a "new-line character" (CR)
(i.e. the end-of-file marker must not be on the same
line as text)
- no file by the name of "---hi---.you" can exist in the current
directory (why would you have a file with a name like
this anyway?), since the even-numbered pages are stored in
a created file of this name.
--------------------------------->>Invocation<<---------------------------------
Printdoc can be invoked with the name "printdoc", and the file
to be printed can be given as a command line parameter.
For example: "printdoc manual.txt".
If the file is not specified on the command line, printdoc will prompt
for the name of the file. The filename string cannot be longer than 64
characters, and can include a path, as well as the file name.
For example: "printdoc c:\swamp\land\sales\howto.doc".
---------------------------------->>Options<<-----------------------------------
When Printdoc is run, after the filename has been recognized,
and the file found and opened, you will be asked if you would like to
view and/or change the parameter settings. A response of 0 will accept
the default settings, but by responding 1 to this query, a menu showing
the four settings and their default values will be shown. Choosing the
number to the left of a parameter will allow you to read a description
of that parameter's function and allow you to change its value. The
various parameters are discussed below.
*-**-***-*****-********-*************-*********************-**************...
Parameter: page size
Default setting: 66
Description: The page size is the number of lines that
can be printed on one page. For a standard
8 1/2 x 11 inch sheet, this is 66 (the
default). For a legal sized sheet of paper,
8 1/2 x 14 inches, the value is 84. To
calculate the number of lines for an
arbitrary size sheet, multiply the length in
inches by 6.
Setting Options: new value, or enter 0 for default (66).
*-**-***-*****-********-*************-*********************-**************...
Parameter: line width.
Default setting: 80
Description: The line width is the maximum number of char-
acters that will be read by printdoc for one
line. If the document has lines greater than
80 characters, this parameter must be set to
the GREATEST EXPECTED value. Note: this value
does not include the CR at the end of the line.
Setting Options: new value, or enter 0 for default (80).
*-**-***-*****-********-*************-*********************-**************...
Parameter: text mode
Default setting: pica
Description: The text can be printed on the printer in a
variety of pitches. The codes used are
standard Epson/IBM printer codes. Pitches/
modes available are pica, elite, condensed,
near-letter quality (on my STAR, this is
always 10 char/inch, but may vary on other
printers), and custom. For the case of custom
text mode, the user enters the decimal values
of the printer codes he/she wishes to send to
the printer. CHOOSING ELITE AND CONDENSED WILL
CHANGE THE SIZE OF THE LEFT MARGIN. It is
assumed that a margin is desired (for hole-
punching, etc.); elite and condensed set the
left margin for 1 inch. If this is not desired,
it is necessary to reset the left margin
parameter after selecting the text mode.
Setting Options: 1. pica (10 char/inch) ESC - P
2. elite (12 char/inch) ESC - M
3. condensed (17 char/inch) ESC - <SI>
4. near-letter quality on ESC - x - 1
(off ESC - x - 0)
5. custom
*-**-***-*****-********-*************-*********************-**************...
Parameter: printer device.
Default setting: prn.
Description: This is the dos device name to which your
printer is assigned.
Setting Options: 1. prn
2. lpt1
3. lpt2
*-**-***-*****-********-*************-*********************-**************...
Parameter: Left margin.
Default setting: 0
Description: This is the size of the left margin INSERTED
by printdoc. This value does not include any
margin that may be built into the document to
print. Note: selecting a text mode of elite
or condensed will cause this value to be set
to a one-inch margin (12 for elite, 17 for
condensed. If this is not the size margin
desired for one of those pitches, it is
necessary to choose the text mode, then reset
the left margin value.
Setting Options: New value, or 0 for current value.
*-**-***-*****-********-*************-*********************-**************...
Parameter: Page breaks
Default setting: yes
Description: A page break is a set of blank lines used to
separate one page from another, and to put a
margin at the top and bottom of a page of
print. The page break parameter tells
Printdoc whether the source file has blank
lines in it already, or whether Printdoc must
put in headers and footers for each page.
In the default case, Printdoc IS EXPECTING
page breaks to already exist. If the default
setting is changed to no, then Printdoc will
print blank lines at the top of each page,
count and print the number of lines of text
for one page (page size - (header + footer),
then fill in blank lines to complete the page.
Setting options: Enter 1 for yes or enter 0 for no.
*-**-***-*****-********-*************-*********************-**************...
Parameter: Header size.
Default setting: 3.
Description: The header is the number of blank lines printed
at the top of a page. The default setting is
3 lines, which equals 1/2 inch. This parameter
is used only if page brea